import React,{Component} from "react";
import { Link } from "react-router";
import { bindActionCreators } from "redux";
import { Toast } from "antd-mobile";
import { connect } from "react-redux";
import * as OrderActions  from "@/actions/Order";
import App from "@/components/App"
import "../../styles/home/Home.scss"
class Home extends Component {
  componentDidMount(){
    console.log(this.props);
    //const { getOrderNowData } =this.props.orderActions
    // getOrderNowData()
    // .then(data=>{
    //   console.log('data: ', data);
    // })
    // .catch(error=>{
    //   console.log('error: ', error);
    // })
  }
  render() {
    return (
      <div className="home_concent">
        <Link to={`/list`}>
            <p className="go_list">我是Home,点我去List</p>
        </Link>
        <App/>
      </div>
    );
  }
}
const actionCreator = dispatch => {
  const orderActions=bindActionCreators(OrderActions,dispatch);
	return { orderActions };
}
export default connect(state => {
	const { Order } = state;
	return { Order };
}, actionCreator)(Home);

